package com.example.manualManagement.controller.user.account;


import com.example.manualManagement.service.user.account.RegisterService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;

import java.util.Map;

@RestController
public class RegisterCtrl{
    @Autowired
    private RegisterService registerService;

    @PostMapping("/manage/register")
    public Map<String, String> register(@RequestBody Map<String, String> map){
        String userName = map.get("userName");
        String userPassword = map.get("userPassword");
        String confirmedPassword = map.get("confirmedPassword");
        return registerService.register(userName, userPassword,confirmedPassword);
    }
}
